package com.harmay.center.monitor.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

/**
 * @author Zuper
 * @version 1.0
 * @date 2022/9/1 15:03
 */
@Data
@TableName("t_history_info")
public class MetricHistory {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("subject_name")
    private String subjectName;

    @TableField("message")
    private String message;

    @TableField("create_time")
    private String createTime;

    @TableField("update_time")
    private String updateTime;

    public static MetricHistory create(String subjectName, String message) {
        MetricHistory history = new MetricHistory();
        history.setSubjectName(subjectName);
        history.setMessage(message);
        return history;
    }
}
